package com.online.teaching;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @ClassName : Application  //类名
 * @Description :   //描述
 * @Author : YG  //作者
 * @Date: 2020-11-05 00:55  //时间
 */
@ServletComponentScan("com.online.teaching.config")
@MapperScan(basePackages = {"com.online.teaching.dao"})
@SpringBootApplication(scanBasePackages = {"com.online.teaching.*"})
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }

    @Bean(name = "restTemplate")
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
